import { api } from '@/axios/instance';

export type PostUploadFiles = AxiosRequestConfig<any>;

const fileHeaders = { headers: { 'Content-Type': 'multipart/form-data' } };

export const fileUpload = async ({ params, config = fileHeaders }: any) =>
  api.post('/api/files/load', params, config);

export const fileDelete = async ({ params, config }: any) =>
  api.post('/api/files/delete', params, config);

export const axiosAddFilesTask = async ({ params, config }: any) => {
  const { data } = await api.post('/api/TaskBoard/files/load', params, config);
  return data;
};
